package io.kiki.sba.registry.server.metadata.slot.util;

import lombok.Getter;
import lombok.Setter;

import java.util.Objects;

@Setter
@Getter
public class FollowerToAssign {
    private final int slotId;
    private final int assigneeNums;

    public FollowerToAssign(int slotId, int assigneeNums) {
        this.slotId = slotId;
        this.assigneeNums = assigneeNums;
    }


    @Override
    public boolean equals(Object o) {
        if (this == o)
            return true;
        if (o == null || getClass() != o.getClass())
            return false;
        FollowerToAssign that = (FollowerToAssign) o;
        return slotId == that.slotId && assigneeNums == that.assigneeNums;
    }

    @Override
    public int hashCode() {
        return Objects.hash(slotId, assigneeNums);
    }
}
